import request from '@/utils/request'

const api = {
    personGroupApi: '/group/personGroup',
    orgGroupApi: '/group/organizationGroup'
};



export function getList(parameter) {
    return request({
        url: '/group/personGroup/list',
        method: 'get',
        params: parameter
    })
}


// 0707新增人员群组和机构群组
export function getMyPersonGroup(parameter) {
    return request({
        url: '/group/myPersonGroup/list',
        method: 'get',
        params: parameter
    })
}



export function getMyOrganizationGroup(parameter) {
    return request({
        url: '/group/myOrganizationGroup/list',
        method: 'get',
        params: parameter
    })
}

export function getInfo(unid) {
    return request({
        url: api.personGroupApi + '/' + unid,
        method: 'get'
    })
}

export function saveModule(parameter) {
    return request({
        url: api.personGroupApi,
        method: 'post',
        data: parameter,
        headers: {
            'Content-Type': 'application/json;charset=UTF-8'
        }
    })
}

export function delModule(parameter) {
    return request({
        url: api.personGroupApi,
        method: 'Delete',
        params: parameter
    })
}

// 20230921--机构群组
export function getOrgGroupList(parameter) {
    return request({
        url: api.orgGroupApi + '/list',
        method: 'get',
        params: parameter
    })
}

export const qbglExport = api.qbgl + '/export'
